/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Lab6_test;

import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author c0909h1169
 */
public class Data {

    public Data() {
    }

    //create an array
    private String[] provinceArr ={"Ha Noi","Hai Phong","Da Nang","Quang Ninh","Thai Nguyen"};
    int random;
    boolean flag = false;

    public void getArr() {

        //init
        for(int i = 0;i<5;i++)
        {
            System.out.println(provinceArr[i]);
            System.out.println(i);
            this.random = i;
        }

        
    }


    //display
    public void displayArr()
    {

        System.out.println(this.provinceArr[this.random]);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ex) {
                //Logger.getLogger(Data.class.getName()).log(Level.SEVERE, null, ex);
            }
        
    }


}
